﻿@{
    ViewBag.Title = "DocView";
    Layout = null;
    string isVote = ViewData["isVote"] == null ? "N" : ViewData["isVote"].ToString();
}
@model ElingOA6_DSJCJ.Model.Document
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=7" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>@ElingOA6_DSJCJ.Common.GlobalConstant.CONSTRING_SYSTITLE</title>
    <link href="@Url.Content("~/Content/style.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery.min.js")" type="text/javascript"></script>
    @if (false)
    {
        <script src="../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
    }
    <script src="@Url.Content("~/Scripts/ntko.js", true)" type="text/javascript"></script>
</head>
<script>
    var docId=@Model.FDocId;

</script>
<script>

    function doPrint() {
        window.print();
    }

</script>
<body onload="doPrint()">
    <table width="100%" align="center" cellspacing="0" style="margin-top: 0px;">
        <tr>
            <td align="center" bgcolor="#FFFFFF">
                <table width="98%" align="center" cellspacing="0" style="margin-top: 0px;">
                    <tr>
                        <td width="98%" align="center" bgcolor="#FFFFFF">
                            <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td colspan="2">
                                        <table width="98%" border="0" cellpadding="0" cellspacing="0">
                                            <tr>
                                                <td height="60" colspan="2" align="center" class="inbluefont" style="text-align: center;
                                                    color: #ae1001; font-family: 'microsoft yahei'; font-size: 18px;">
                                                    @Model.FTitle
                                                </td>
                                            </tr>
                                        
                                           @if (!string.IsNullOrEmpty(Model.FSubTitle))
                                           { 
                                                <tr>
                                                    <td height="30" colspan="2" align="center" class="inbluefont" style="text-align: center;
                                                        color: #ae1001; font-family: 'microsoft yahei'; font-size: 18px;">
                                                        <h3 style="color: #666; font-family: microsoft yahei; font-size: 16px; margin: 5px 0;
                                                            text-align: center; width: 100%; float: left;">@Model.FSubTitle</h3>
                                                    </td>
                                                </tr>
                                              
                                           }   
                                             
                                          @if(!string.IsNullOrEmpty(Model.FReferenceNo))
                                             {   <tr>
                                                    <td height="30" colspan="2" align="center" class="inbluefont" style="text-align: center;
                                                        color: #ae1001; font-family: 'microsoft yahei'; font-size: 18px;">
                                                        <h4 style="color: #666; font-family: microsoft yahei; font-size: 14px; margin: 5px 0;
                                                            text-align: center; width: 100%; float: left; font-weight: 500;">
                                                            @Model.FReferenceNo</h4>
                                                    </td>
                                                </tr>
                                                     
                                              }  
                                                
                                                
                                           <tr>
                                                <td colspan="2" align="center" style="float: left; line-height: 30px; margin-bottom: 25px;
                                                    border-bottom: #CCC 1px dashed; padding-bottom: 15px; color: #7E7E7E;">
                                                    @{	 string pubname =string.IsNullOrEmpty(@Model.FAuthor)?"": "作者:" + @Model.FAuthor;  <span >@pubname    </span>}&nbsp;<span>发布时间：@Model.FPubDate.ToString("yyyy-MM-dd")</span>
                                                    <span>来源：@Model.FDeptName</span> <span>阅读次数：<span id="hits">@Model.FReadCnt.ToString()</span>
                                                </td>
                                            </tr>
                                            @if (Model.FEditMode == "H")
                                            {
                                
                                                <tr>
                                                    <td colspan="2" align="left" style="line-height: 30px; text-align: left; min-height: 300px;
                                                        _height: 300px; table-layout: fixed; word-wrap: break-word; overflow: hidden;"
                                                        class="autoimg">
                                                        @if (ViewData["docAttachPicList"] != null)
                                                        {
                                                            foreach (ElingOA6_DSJCJ.Model.DocAttach docAttachModel in ViewData["docAttachPicList"] as List<ElingOA6_DSJCJ.Model.DocAttach>)
                                                            {
                                                            @:<div style='text-align: center'>
@:<img width='600px' src='@docAttachModel.FAttachSvrFileName' height="400px" /><br /><br />
 @:</div>
                                                                                                                                                                                                                                    }
                                                        }
                                                                    <table width="970px" style="margin-right: auto; margin-left: auto"><tr><td align="left" style="font-family: sans-serif;">@Html.Raw(Model.FContentTxt)                    </td></tr></table>

                                                         @if (!string.IsNullOrEmpty(@Model.FDownTitle) & !string.IsNullOrEmpty(@Model.FDownDateString))
                                                         {
          <p style="FONT-SIZE: 16px; FONT-FAMILY: 宋体; TEXT-ALIGN: right"> @Model.FDownTitle
          <br />
          @Model.FDownDateString
          </p>
               
         
                                                         }
                                                    </td>
                                                </tr>
                                           
                                            }
                                            <tr align="left">
                                                <td>
                                                    @if (null != ViewData["docAttach"])
                                                    {
                                                        List<ElingOA6_DSJCJ.Model.DocAttach> docAttachList = ViewData["docAttach"] as List<ElingOA6_DSJCJ.Model.DocAttach>;
                                                        if (docAttachList.Count > 0)
                                                        {
                                                        <table width="880" border="0" style="text-align: left" cellpadding="0" cellspacing="0"
                                                            style="margin-top: 10px;">
                                                            <tr>
                                                                <td colspan="2" width="980" height="40" style="border-bottom: 2px solid #CCCCCC">
                                                                    <br />
                                                                    附件:
                                                                </td>
                                                            </tr>
                                                            @foreach (ElingOA6_DSJCJ.Model.DocAttach attachModel in docAttachList)
                                                            {
                                                                <tr>
                                                                    <td colspan="2" width="980" height="40" style="border-bottom: 2px solid #CCCCCC">
                                                                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="/Index/AttachDownLoad?attachID=@attachModel.FAttachID">@(string.IsNullOrEmpty(attachModel.FAttachDesc) ? attachModel.FAttachOldFileName : attachModel.FAttachDesc)</a>
                                                                    </td>
                                                                </tr>
                                                            }
                                                        </table>
                                                        }
                                                    }
                                                </td>
                                            </tr>
                                            @if (Model.FEditMode == "H")
                                            {
                                                <tr>
                                                    <td colspan="2" height="26" align="right" style='padding-right: 40px' bgcolor='#f3f3f3'>
                                                        <a href='#' class='bt_link'>返回顶部</a>&nbsp;&nbsp;<a href="javascript:window.print();"
                                                            class='bt_link'>打印本页</a>&nbsp;&nbsp;<a href='javascript:window.close()' class='bt_link'>关闭本页</a>
                                                    </td>
                                                </tr>
                                            }
                                            @if (isVote == "Y")
                                            {
                                                <tr>
                                                    <td align="right" style="margin-right: 100px">
                                                        <a href="javascript:void(0)" onclick='vote();'>
                                                            <img src="@Url.Content("~/Content/images/vote.png", true)" style="border:0" />
                                                        </a>
                                                    </td>
                                                </tr>
                                            }
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    @*<style>
        img
        {
            max-width: 400px;
            max-height: 300px;
            width: expression(this.width > 400 ? "400px" : this.width);
            height: expression(this.width > 400 ? "300px" : this.height);
        }
    </style>*@
</body>
</html>
